# include <stdio.h>
# include <conio.h>
# include <math.h>

double f(double);
double df(double);
double ddf(double);

void main()
{
  double a,b,e,x,x0;
  printf("a=");
  scanf("%lg",&a);
  printf("b=");
  scanf("%lg",&b);
  printf("e=");
  scanf("%lg",&e);
  if(f(a)*ddf(a)>=0)
    x0=a;
  else
    x0=b;
  x=x0;
  do
    {
      x0=x;
      x=x0-f(x0)/df(x0);
    }
  while(fabs(x-x0)>e);
  printf("\n x=%g",x);

  getch();
};

double f(double x)
{
  return 3*x*x*x*x+4*x*x*x-12*x*x-5;
};

double df(double x)
{
  return 12*x*(x*x+x-2);
};

double ddf(double x)
{
  return 36*x*x+24*x-24;
};
